﻿using System.Collections.Generic;
using System.Windows.Forms;

namespace QLKDS.DAL
{
    public class WindowManager
    {
        private static WindowManager instance;

        public WindowManager()
        {
            this.Windows = new List<Form>();
            this.WindowNames = new List<string>();
        }

        public static WindowManager Instance
        {
            get 
            {
                if (instance == null)
                {
                    instance = new WindowManager();
                }
                return instance;
            }
        }

        public List<Form> Windows { get; set;}
        public List<string> WindowNames { get; set; }

        public void SetFocusSelectedForm(string windowName)
        {
            this.Windows[this.WindowNames.IndexOf(windowName)].Focus();
        }
    }
}
